Micron Document
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| SparkN0de-git | SparkN0de |
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Commit a185b980774b67607cb7ec318f04041b4e78462f


Parents : e89912c
Author : Mark Qvist <mark@unsigned.io>
Date : 2025-11-24T18:07:30+01:00

Disable pre-compiled native filters loading on Windows

Changes

1 files changed, 10 insertions(+), 5 deletions(-)

M LXST/Filters.py +10 -5

Diff

diff --git a/LXST/Filters.py b/LXST/Filters.py
index 4414093..6f5e568 100644
--- a/LXST/Filters.py
+++ b/LXST/Filters.py
@@ -16,11 +16,16 @@ else:
ffi = FFI()
try:
- filterlib_spec = find_spec("LXST.filterlib")
- if not filterlib_spec or filterlib_spec.origin == None: raise ImportError("Could not locate pre-compiled LXST.filterlib module")
- with open(os.path.join(c_src_path, "Filters.h"), "r") as f: ffi.cdef(f.read())
- native_functions = ffi.dlopen(filterlib_spec.origin)
- USE_NATIVE_FILTERS = True
+ # Disable native filterlib loading on Windows
+ # for now due to strange linking behaviour,
+ # but allow local compilation if the user has
+ # a C compiler installed.
+ if not RNS.vendor.platformutils.is_windows():
+ filterlib_spec = find_spec("LXST.filterlib")
+ if not filterlib_spec or filterlib_spec.origin == None: raise ImportError("Could not locate pre-compiled LXST.filterlib module")
+ with open(os.path.join(c_src_path, "Filters.h"), "r") as f: ffi.cdef(f.read())
+ native_functions = ffi.dlopen(filterlib_spec.origin)
+ USE_NATIVE_FILTERS = True
except Exception as e:
RNS.log(f"Could not load pre-compiled LXST filters library. The contained exception was: {e}", RNS.LOG_WARNING)


──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────